<template>
	<view class="container container17601">
		<view class="flex flex-wrap diygw-col-24 items-center flex-clz">
			<view class="flex diygw-col-0">
				<view class="diygw-avatar lg radius bg-none">
					<image mode="aspectFit" class="diygw-avatar-img radius" src="/static/icon2_szyh.png"></image>
				</view>
			</view>
			<view class="diygw-col-1 text-clz diygw-text-md"> 姓名 </view>
			<view class="diygw-col-10"> {{name}} </view>
		</view>
		<view v-for="(item,index) in printArray" class="flex flex-wrap diygw-col-24 items-center flex-clz">
			<view class="flex diygw-col-24 items-center flex-nowrap flex1-clz">
				<image src="/static/icon11_cy.png" class="diygw-image diygw-col-0" style="height: 24px !important; width: 24px" mode="widthFix"></image>
				<view class="diygw-col-0 text2-clz"> 学号 </view>
				<view class="diygw-col-10"> {{item.code}} </view>
			</view>
			<view class="flex diygw-col-24 items-center flex-nowrap flex3-clz">
				<image src="/static/icon11_jfxqhz.png" class="diygw-image diygw-col-0" style="height: 24px !important; width: 24px" mode="widthFix"></image>
				<view class="diygw-col-0 text3-clz"> 科目 </view>
				<view class="diygw-col-10"> {{item.subject}} </view>
			</view>
			<view class="flex diygw-col-24 items-center flex-nowrap flex4-clz">
				<image src="/static/icon11_cxcy.png" class="diygw-image diygw-col-0" style="height: 24px !important; width: 24px" mode="widthFix"></image>
				<view class="diygw-col-0 text5-clz"> 成绩 </view>
				<view class="diygw-col-10"> {{item.grade}} </view>
			</view>
		</view>
		<view class="version text-grey flex-direction-column flex diygw-col-24 justify-center align-center">
			
		</view>
		<view class="clearfix"></view>
	</view>
</template>


<script>
	export default {
		data() {
			return {
				//用户全局信息
				userInfo: {},
				//页面传参
				globalOption: {},
				//自定义全局变量
				globalData: {},
			    name:'',
				code:'',
				grade:'',
				subject:'',
				printArray:[]
			};
		},
		onShow() {
			this.setCurrentPage(this);
		},
		onLoad(option) {
			console.log(option);
			// this.code=option.code;
			this.name=option.name;
			// this.subject=option.subject;
			// this.grade=option.grade;
			this.get_id(option.name);
			//this.setCurrentPage(this);
			if (option) {
				this.setData({
					globalOption: this.getOption(option)
				});
			}

			this.init();
		},
		methods: {
			async init() {},
			get_id(name){
				uni.request({
					url:'http://127.0.0.1:8080/api/demo/get_listbyid',
					method:'POST',
					data:{
						name:name
			 		},
					
			 	}).then((res)=>{
			 		console.log(res);
					this.printArray=res.data.data;
					// this.name=this.printArray[0].name;
			 	// 	this.id=this.printArray[0].id;
			 	})
			 }
		}
	};
</script>
<style lang="scss" scoped>
	.flex-clz {
		padding-top: 8px;
		border-bottom-left-radius: 20px;
		z-index: 100;
		padding-left: 8px;
		padding-bottom: 8px;
		border-top-right-radius: 20px;
		margin-right: 10px;
		background-color: rgba(255, 255, 255, 1);
		margin-left: 10px;
		box-shadow: 0px 1px 3px rgba(31, 31, 31, 0.16);
		overflow: hidden;
		width: calc(100% - 10px - 10px) !important;
		border-top-left-radius: 20px;
		margin-top: 10px;
		border-bottom-right-radius: 20px;
		margin-bottom: 10px;
		padding-right: 8px;
	}
	.text-clz {
		margin-left: 5px;
		flex: 1;
		width: calc(4.1666666667% - 5px - 5px) !important;
		margin-top: 5px;
		margin-bottom: 5px;
		margin-right: 5px;
	}
	.flex1-clz {
		padding-top: 10px;
		padding-left: 10px;
		padding-bottom: 10px;
		border-bottom: 1px solid #efefef;
		padding-right: 10px;
	}
	.text2-clz {
		padding-top: 0px;
		flex: 1;
		padding-left: 5px;
		font-size: 14px !important;
		padding-bottom: 0px;
		padding-right: 0px;
	}
	.flex3-clz {
		padding-top: 10px;
		padding-left: 10px;
		padding-bottom: 10px;
		border-bottom: 1px solid #efefef;
		padding-right: 10px;
	}
	.text3-clz {
		padding-top: 0px;
		flex: 1;
		padding-left: 5px;
		font-size: 14px !important;
		padding-bottom: 0px;
		padding-right: 0px;
	}
	.flex4-clz {
		padding-top: 10px;
		padding-left: 10px;
		padding-bottom: 10px;
		border-bottom: 1px solid #efefef;
		padding-right: 10px;
	}
	.text5-clz {
		padding-top: 0px;
		flex: 1;
		padding-left: 5px;
		font-size: 14px !important;
		padding-bottom: 0px;
		padding-right: 0px;
	}
	.container17601 {
		padding-left: 0px;
		padding-right: 0px;

		font-size: 12px;
	}
	.container17601 {
	}
</style>